// 通过方法访问 https://next.vuex.vuejs.org/zh/guide/getters.html

import { objToArr } from "@/utils";

export const getColumnById = (state) => (id: string) => {
  return state.columns.data[id];
};

export const getPostsById = (state) => (id: string) => {
  return objToArr(state.posts.data);
};

export const getCurrentPost = (state) => (id: string) => {
  return state.posts.data[id];
};
